package com.raja.servingStation.common.util;

/**
 * Created by tianjie on 2017/5/5.
 */
public class VSException extends Exception{

    private int errorCode;

    private String innerMsg;

    private String outMsg;

    public VSException(String message, Throwable cause, int errorCode, String innerMsg, String outMsg) {
        super(message, cause);
        this.errorCode = errorCode;
        this.innerMsg = innerMsg;
        this.outMsg = outMsg;
    }

    public VSException(int errorCode, String innerMsg, String outMsg) {
        this.errorCode = errorCode;
        this.innerMsg = innerMsg;
        this.outMsg = outMsg;
    }

    public VSException(String message, Throwable cause, ErrorCodes errorCodes ) {
        super(message, cause);
        this.errorCode = errorCodes.getErrorCode();
        this.innerMsg = errorCodes.getInnerMsg();
        this.outMsg = errorCodes.getOutMsg();
    }

    public VSException(ErrorCodes errorCodes) {
        this.errorCode = errorCodes.getErrorCode();
        this.innerMsg = errorCodes.getInnerMsg();
        this.outMsg = errorCodes.getOutMsg();
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getInnerMsg() {
        return innerMsg;
    }

    public void setInnerMsg(String innerMsg) {
        this.innerMsg = innerMsg;
    }

    public String getOutMsg() {
        return outMsg;
    }

    public void setOutMsg(String outMsg) {
        this.outMsg = outMsg;
    }
}
